$(".justify").click(function(){
	    $('.window-body').toggleClass('with-sidebar');
	});
	
	$(".catalog-body li i").click(function(){
	    $(this).toggleClass('down');
		$(this).toggleClass('right');
		$(this).parent().toggleClass('open');
		
	});
	
	
	$(".share").click(function(){
	    $('.share').toggleClass('visible');
		$('.dropdown').toggleClass('visible');
		$('.transition').toggleClass('visible');
		
	});
	
	$(".delete").click(function(){
	   $('#Search').val('');
	   $('.search-icon').removeClass('delete');
	});
	
	
	
	
	
	$("#Search").bind("input propertychange",function(){
		$('.search-icon').removeClass('delete');
	  if($('#Search').val()==''){
	  	
		$(".search-body").hide();
	  }
	});

	var url=window.location.href;
	var urlArr = url.split('?');
	var k = urlArr[0], appU = k.split('/');
	
	var filename = appU[appU.length-1];
	urlArr = filename.split('.');
	filename = urlArr[0];
	
	if(filename!='' && filename!='#'){
	   $('.'+filename).toggleClass('active');
	//$('.'+filename +' ul').length!=0 && 
	  if($('.'+filename ).parent().parent().hasClass('catalog-body')==false){
	   $($('.'+filename).parent().parent()).find('i').toggleClass('down');
	   $($('.'+filename).parent().parent()).find('i').toggleClass('right');
	   $('.'+filename).parent().parent().toggleClass('open');
	   }
    }
	
	
	
	var qrcode = new QRCode('qrcode', {
	    text: window.location.href,
	    width: 256,
	    height: 256,
	    colorDark: '#000000',
	    colorLight: '#ffffff',
	    correctLevel: QRCode.CorrectLevel.H
	});
	
	var clipboard = new Clipboard('#copyurl', {
	   // 通过target指定要复印的节点
	       text: function() {
	                  return '{$config.setup.name} '+ window.location.href;
	          }
	   });
	
	    clipboard.on('success', function(e) {
	        $('#copyurlname').html('已复制');
	    });
	
	
	var clipboard = new Clipboard('#copyurl', {
	   // 通过target指定要复印的节点
	       text: function() {
	                  return '{$config.setup.name} '+ window.location.href;
	          }
	   });
	
	    clipboard.on('success', function(e) {
	        $('#copyurlname').html('已复制');
	    });